package org.opens.mybatisplus.pojo.one2one;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })注解是为了解决jackson将对象转换成json时如果配置为懒加载就会报错.
 */
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class EkPerson2 implements Serializable {

    private Integer id;

    private String name;

    private List<EkPet> ekPet = new ArrayList<>();

    public EkPerson2() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<EkPet> getEkPet() {
        return ekPet;
    }

    public void setEkPet(List<EkPet> ekPet) {
        this.ekPet = ekPet;
    }

    @Override
    public String toString() {
        return "EkPerson{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }

}